define([],function(){
	var tpl = {};

	// 宝宝基本信息
	tpl.info = function(){
		var html = "";
		html += info();
		return html;
	}
	// 填写评估数据
	tpl.fillAssessData = function(){
		var html = "";
		html += fillAssessData();
		html += assessForm01();
		html += assessForm02();
		html += assessForm03();
		html += assessForm04();
		html += assessForm05();
		html += assessForm06();
		html += assessForm07();
		return html;
	}

	var info = function(){
		return 	'<script id="assess_detail_info" type="text/html">'+
				'	<div class="panel-heading">'+
				'		<div class="title"><i class="fa fa-user"></i>宝宝基本资料</div>'+
				'		<div class="time">患者提交评估时间：{{createTime}}</div>'+
				'  	</div>'+
				'  	<div class="panel-body">'+
				'  		<ul class="monthlyAssessDetail-info clearfix">'+
				'			<li>手机号：{{phoneNo}}</li>'+
				'			<li>宝宝姓名：{{userName}}</li>'+
				'			<li>宝宝性别：{{gender}}</li>'+
				'			<li>出生日期：{{birthday}}</li>'+
				'			<li>出生体重：{{birthdayWeight}}</li>'+
				'			<li>孕周：{{pregnancyDay}}</li>'+
				'			<li>身长：{{height}}{{if height}}cm{{/if}}</li>'+
				'			<li>体重：{{weight}}{{if weight}}kg{{/if}}</li>'+
				'			<li>头围：{{headCircumference}}{{if headCircumference}}cm{{/if}}</li>'+
				'		</ul>'+
				'  	</div>'+
				'</script>';
	}
	var fillAssessData = function(){
		return 	'<script id="assess_detail_fillAssessData" type="text/html">'+
				'	<div class="panel-heading">'+
				'    	<div class="title"><i class="fa fa-user"></i>填写评估数据</div>'+
				'  	</div>'+
				'  	<div class="panel-body">'+
				'		<div class="assess-tab-wrap">'+
				'			<ul class="assess-tab clearfix">'+
				'				<li {{if type=="01"}}class="actived"{{/if}}><span>体格发育评估</span></li>'+
				'				<li {{if type=="02"}}class="actived"{{/if}}><span>智力发育评估</span></li>'+
				'				<li {{if type=="03"}}class="actived"{{/if}}><span>养育环境评估</span></li>'+
				'				<li {{if type=="04"}}class="actived"{{/if}}><span>育儿健康指导</span></li>'+
				'				<li {{if type=="05"}}class="actived"{{/if}}><span>综合情况评估</span></li>'+
				'				<li {{if type=="06"}}class="actived"{{/if}}><span>指派评估医生</span></li>'+
				'				<li {{if type=="07"}}class="actived"{{/if}}><span>完成评估</span></li>'+
				'			</ul>'+
			  	'		</div>'+
			  	'		<div class="assess-form">'+
			  	'			{{if type=="01"}}'+
				'				{{include "tpl_assess_form01",result}}'+
				'			{{else if type=="02"}}'+
				'				{{include "tpl_assess_form02",result}}'+
				'			{{else if type=="03"}}'+
				'				{{include "tpl_assess_form03",result}}'+
				'			{{else if type=="04"}}'+
				'				{{include "tpl_assess_form04",guide}}'+
				'			{{else if type=="05"}}'+
				'				{{include "tpl_assess_form05",guide}}'+
				'			{{else if type=="06"}}'+
				'				{{include "tpl_assess_form06",data}}'+
				'			{{else if type=="07"}}'+
				'				{{include "tpl_assess_form07",data}}'+
				'			{{/if}}'+
			  	'		</div>'+
				'	</div>'+
			  	'  	<div class="panel-footer">'+
				'		<div class="text-right" workOrderId="{{workOrderId}}" type="{{type}}" {{if evaluationId}}evaluationId="{{evaluationId}}"{{/if}}>'+
				'			{{if type!="01" && type!="07"}}'+
				'				<btn id="preStep" class="btn btn-default">上一步</btn>'+
				'			{{/if}}'+
				'			{{if type!="07"}}'+
				'				<btn id="nextStep" class="btn btn-default">下一步</btn>'+
				'			{{else}}'+
				'				<btn id="modifyBtn" class="btn btn-default">修改</btn>'+
				'				<btn id="finishBtn" class="btn btn-default">完成</btn>'+
				'			{{/if}}'+
				'		</div>'+
			  	'	</div>'+
				'</script>';
	}

	var assessForm01 = function(){
		return 	'<script id="tpl_assess_form01" type="text/html">'+
				'	<ul class="assess-form01 clearfix">'+
				'		<li>'+
				'			<div class="tit">身长评估</div>'+
				'			<div class="con">'+
				'				<div class="clearfix">'+
				'				    <label>宝宝身长：</label>'+
				'				    <p>{{heightMap.height}}{{if heightMap.height}}cm{{/if}}</p>'+
				'				</div>'+
				'				<div class="clearfix">'+
				'				    <label>百分位：</label>'+
				'				    <p>{{heightMap.percentileRange}}</p>'+
				'				</div>'+
				'				<div class="clearfix">'+
				'				    <label>身长解读：</label>'+
				'				    <div><textarea id="heightAnalysis" class="form-control" rows="3">{{heightMap.analysis}}</textarea></div>'+
				'				</div>'+
				'			</div>'+
				'		</li>'+
				'		<li>'+
				'			<div class="tit">体重评估</div>'+
				'			<div class="con">'+
				'				<div class="clearfix">'+
				'				    <label>宝宝体重：</label>'+
				'				    <p>{{weightMap.weight}}{{if weightMap.weight}}kg{{/if}}</p>'+
				'				</div>'+
				'				<div class="clearfix">'+
				'				    <label>百分位：</label>'+
				'				    <p>{{weightMap.percentileRange}}</p>'+
				'				</div>'+
				'				<div class="clearfix">'+
				'				    <label>体重解读：</label>'+
				'				    <div><textarea id="weightAnalysis" class="form-control" rows="3">{{weightMap.analysis}}</textarea></div>'+
				'				</div>'+
				'			</div>'+
				'		</li>'+
				'		<li>'+
				'			<div class="tit">头围评估</div>'+
				'			<div class="con">'+
				'				<div class="clearfix">'+
				'				    <label>宝宝头围：</label>'+
				'				    <p>{{headtMap.headCircumference}}{{if headtMap.headCircumference}}cm{{/if}}</p>'+
				'				</div>'+
				'				<div class="clearfix">'+
				'				    <label>百分位：</label>'+
				'				    <p>{{headtMap.percentileRange}}</p>'+
				'				</div>'+
				'				<div class="clearfix">'+
				'				    <label>头围解读：</label>'+
				'				    <div><textarea id="headAnalysis" class="form-control" rows="3">{{headtMap.analysis}}</textarea ></div>'+
				'				</div>'+
				'			</div>'+
				'		</li>'+
				'	</ul>'+
				'</script>';
	}
	var assessForm02 = function(){
		return 	'<script id="tpl_assess_form02" type="text/html">'+
				'	{{if flag}}'+
				'		<div class="assess-form02">'+
				'			<ul class="assess-form-ul clearfix">'+
				'				{{each arr as value i}}'+
				'					<li>'+
				'						<span>{{value.desc}}：</span>'+
				'						<span>{{value.score}}分 {{if value.result}}（{{value.result}}）{{/if}}</span>'+
				'					</li>'+
				'				{{/each}}'+
				'			</ul>'+
				'			<div class="system-result">'+
				'				<div class="system-result-tit">系统结果：</div>'+
				'				{{each arrAotuGuide as value i}}'+
				'				<span>{{value.key}}：</span>'+
				'				<p>{{value.text}}</p>'+
				'				{{/each}}'+
				'			</div>'+
				'			<div class="assess-form-textarea clearfix">'+
				'				<label>解读内容：</label>'+
				'				<div><textarea id="analysis02" class="form-control" rows="3">{{suggest}}</textarea></div>'+
				'			</div>'+
				'		</div>'+
				'	{{else}}'+
				'		<div class="assess-form02-no">该宝宝没有做智力发育评估</div>'+
				'	{{/if}}'+
				'</script>';
	}
	var assessForm03 = function(){
		return 	'<script id="tpl_assess_form03" type="text/html">'+
				'	{{if flag}}'+
				'		<div class="assess-form03">'+
				'			<ul class="assess-form-ul clearfix">'+
				'				{{each arr as value i}}'+
				'					<li>'+
				'						<span>{{value.desc}}：</span>'+
				'						<span>{{value.score}}分{{if value.result}}（{{value.result}}）{{/if}}</span>'+
				'					</li>'+
				'				{{/each}}'+
				'			</ul>'+
				'			<div class="system-result">'+
				'				<div class="system-result-tit">系统结果：</div>'+
				'				{{each arrAotuGuide as value i}}'+
				'				<span>{{value.key}}：</span>'+
				'				<p>{{value.text}}</p>'+
				'				{{/each}}'+
				'			</div>'+
				'			<div class="assess-form-textarea clearfix">'+
				'				<label>解读内容：</label>'+
				'				<div><textarea id="analysis03" class="form-control" rows="3">{{suggest}}</textarea></div>'+
				'			</div>'+
				'		</div>'+
				'	{{else}}'+
				'		<div class="assess-form03-no">该宝宝没有做养育环境评估</div>'+
				'	{{/if}}'+
				'</script>';
	}
	var assessForm04 = function(){
		return 	'<script id="tpl_assess_form04" type="text/html">'+
				'	<div class="assess-form04">'+
				'		<div class="assess-form-textarea clearfix">'+
				'			<label>神经行为评价：</label>'+
				'			<div><textarea id="behavioralAnalysis04" class="form-control" rows="3">{{behavioral}}</textarea></div>'+
				'		</div>'+
				'		<div class="assess-form-textarea clearfix">'+
				'			<label>其他检查：</label>'+
				'			<div><textarea id="otherAnalysis04" class="form-control" rows="3">{{other}}</textarea></div>'+
				'		</div>'+
				'		<div class="assess-form-textarea clearfix">'+
				'			<label>预防接种：</label>'+
				'			<div><textarea id="vaccinateAnalysis04" class="form-control" rows="3">{{vaccinate}}</textarea></div>'+
				'		</div>'+
				'		<div class="assess-form-textarea clearfix">'+
				'			<label>喂养建议：</label>'+
				'			<div><textarea id="feedAnalysis04" class="form-control" rows="3">{{feed}}</textarea></div>'+
				'		</div>'+
				'		<div class="assess-form-textarea clearfix">'+
				'			<label>辅食：</label>'+
				'			<div><textarea id="supplementAnalysis04" class="form-control" rows="3">{{supplement}}</textarea></div>'+
				'		</div>'+
				'	</div>'+
				'</script>';
	}
	var assessForm05 = function(){
		return 	'<script id="tpl_assess_form05" type="text/html">'+
				'	<div class="assess-form05">'+
				'		<div class="assess-form-select clearfix">'+
				'			<div>神经行为评价：</div>'+
				'			<ul id="evaluateAnalysis05">'+
				'				{{each list as value i}}'+
				'					<li {{if value.flag}}class="active"{{/if}}>{{value.val}}</li>'+
				'				{{/each}}'+
				'			</ul>'+
				'		</div>'+
				'		<div class="assess-form-textarea clearfix">'+
				'			<label>综合建议：</label>'+
				'			<div><textarea id="suggestAnalysis05" class="form-control" rows="3">{{suggest}}</textarea></div>'+
				'		</div>'+
				'	</div>'+
				'</script>';
	}
	var assessForm06 = function(){
		return 	'<script id="tpl_assess_form06" type="text/html">'+
				'	<div class="assess-form06">'+
				'		<div class="assess-form-select clearfix">'+
				'			<div>选择医生：</div>'+
				'			<ul id="analysis06">'+
				'				{{each doctorList as value i}}'+
				'					<li {{if value.flag}}class="active"{{/if}} doctorId="{{value.doctorId}}">{{value.doctorName}}</li>'+
				'				{{/each}}'+
				'			</ul>'+
				'		</div>'+			
				'	</div>'+
				'</script>';
	}
	var assessForm07 = function(){
		return 	'<script id="tpl_assess_form07" type="text/html">'+
				'	<div class="assess-form07">'+
				'		<div class="tit"><i class="fa fa-check-circle-o"></i>评估完成</div>'+
				'		<div class="con">'+
				'			<span>患者报告链接：</span>'+
				'			<a target="blank" href="{{reportLink}}?reportType={{workOrderId}}">{{reportLink}}?reportType={{workOrderId}}</a>'+
				'		</div>'+
				'	</div>'+
				'</script>';
	}

	return tpl;
});